import pandas as pd

'''
筛选
'''

df = pd.read_excel(io=rf'D:\Desktop\mynewlearn\pandas.xlsx', sheet_name='Sheet2', index_col='项目名称（勿修改）')

df = df.loc[df['四化一类'].apply( \
    lambda a: a == '四化项目' \
    )]

df.sort_values(by=['四化二类', '四化三类'], inplace=True, ascending=[True, True])

for i in df.index:
    print(df['四化一类'].at[i], df['四化二类'].at[i], df['四化三类'].at[i], sep='\t')
